<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>第十二课 DOM（DOM操作）</title>
</head> 
<body>
    <div id="div1" class="div1xxkt" title="星星课堂">星星课堂真好</div>
    <script>
        var div1 = document.getElementById('div1');
        // var div1g = div1.getAttribute('class');//如果获取的元素没有设置，那么这里就只能返回null
        // console.log(div1g);
        // div1.setAttribute('title','xxkt');
        // div1.removeAttribute('class');
        // console.log(div1.innerHTML);
        // div1.innerHTML = '星星课堂真的特别好';
        // console.log(div1.innerHTML);
        // div1.innerHTML = '<span>星星课堂真好</span>';
        div1.style.color = 'orange';
        div1.style.background = 'blue';
        div1.style.fontSize = '60px';
        // console.log(div1.style.color);
    </script>
</body> 
</html>